<layout name="master"/>
<ul class="breadcrumb no-border no-radius b-b b-light pull-in">
    <li><a href="index.html"><i class="fa fa-home"></i> 首页</a></li>
    <li><a href="#">商品管理</a></li>
    <li><a href="#">商品列表</a></li>
</ul>
<div class="m-b-md">
    <h3 class="m-b-none">商品列表</h3>
</div>
<div class="row">
    <div class="col-sm-12">
        <section class="panel panel-default">
            <header class="panel-heading font-bold">商品列表</header>
            <div class="panel-body">
                <form role="form" action="" method="post">
                    <table class="table table-hover">
                        <thead>
                        <tr>
                            <th>编号</th>
                            <th>商品名称</th>
                            <th>价格</th>
                            <!--<th>库存</th>-->
                            <th>点击次数</th>
                            <th>添加时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <style>
                            li{
                                list-style:none
                            }
                        </style>
                        <volist name="Commodity" id="vo">
                            <tr>
                                <th>{$vo.gid}</th>
                                <th>{$vo.gname}</th>
                                <th>
                                    <!--dle标签可以增加删除线-->
                                    <li>市场价: <del>{$vo.marketprice}</del></li>
                                    <li>商城价: <span>{$vo.shopprice}</span></li>
                                </th>
                                <!--<th>{$vo.inventory}</th>-->
                                <th>{$vo.click}</th>
                                <!--格式化时间戳 _###代表标记前面$vo['time']的位置_-->
                                <th>{$vo.time|date="Y-m-d H:i",###}</th>
                                <td>
                                    <div class="btn-group">
                                        <a href="{:U('GoodsList/index',['gid'=>$vo[gid]])}" class="btn btn-default btn-xs">货品列表</a>
                                        <a href="{:U('Commodity/edit',['gid'=>$vo[gid]])}" class="btn btn-success btn-xs">修改</a>
                                        <a href="{:U('Commodity/del',['gid'=>$vo[gid]])}" class="btn btn-info btn-xs">删除</a>
                                    </div>
                                </td>
                            </tr>
                        </volist>
                        </tbody>
                        <!--分页样式书写-->
                        <style>
                            /*其他页、上一页、下一页样式*/
                            .pagination .num,.prev,.next{
                                position: relative;
                                float: left;
                                padding: 6px 12px;
                                margin-left: -1px;
                                line-height: 1.42857143;
                                color: #337ab7;
                                text-decoration: none;
                                background-color: #fff;
                                border: 1px solid #ddd
                            }
                            /*当前分页样式*/
                            .pagination .current{
                                position: relative;
                                float: left;
                                padding: 6px 12px;
                                margin-left: -1px;
                                line-height: 1.42857143;
                                color: red;
                                text-decoration: none;
                                background-color: #fff;
                                border: 1px solid #ddd
                            }
                            .pagination .headerPage{
                                position: relative;
                                float: left;
                                padding: 6px 12px;
                                text-decoration: none;
                                background-color: #fff;

                            }
                        </style>
                        <!--分页样式结束-->
                        <!--展示分页-->
                        <div class="col-sm-12 text-right text-center-xs">
                            <ul class="pagination pagination-sm m-t-none m-b-none">
                                {$page}
                            </ul>
                        </div>
                    </table>
                    <a href="{:U('Commodity/add')}" class="btn btn-info">添加商品</a>
                </form>
            </div>
        </section>
    </div>
</div>
<script>
    function controller($scope, $, _){
    }
</script>
